package v2

import (
	controllers "echoapi/app/controller"
	"echoapi/boot"
	"github.com/labstack/echo/v4"
	"net/http"
)

type NewsController struct {
	*boot.GormAdapter
	controllers.BaseController
}

func NewNewsController() *NewsController {
	return &NewsController{}
}

func (this *NewsController) Index(c echo.Context) error {
	return c.JSON(http.StatusOK, echo.Map{"code": "OK", "msg": "OK", "data": "news/index"})
}

func (this *NewsController) Route(r *echo.Group) {
	r.GET("/news", this.Index)
}
